﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>流程审批</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link href="../Frozenui1.3/css/frozen.css" rel="stylesheet" />
    <link href="../CSS/fs_gallery.css" rel="stylesheet" />
    <script src="../JS/layer/layer.m.js"></script>
    <script src="../JS/zepto.min.js"></script>
    <script src="../Frozenui1.3/js/frozen.js"></script>
    <script src="../JS/MobileCom.js?v=1.1"></script>
    <script src="../JS/avalon.mobile.min.js"></script>
    <script src="../JS/fs_gallery.js"></script>
    <script>
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            //隐藏右上角按钮
            WeixinJSBridge.call('hideOptionMenu');
        });

        var strId = MobileCom.getQueryString("ID");
        //var str = MobileCom.getQueryString("t");

        var model = avalon.define({
            $id: "model",
            isforbid: "",
            code: "lcsp",
            rdm: Math.random(),
            modelData: {},
            tempData: [],
            tpData:[],
            ygData: {},
            sh: "1",
            lg: "",
            ptype: "",
            imgurl: "",
            fdtp: function (obj) {
                if (!$(".fs_gallery").html()) {
                    $('.mall_pcp').fsgallery();
                    $(obj).trigger("click");
                }
            }
        });
        avalon.ready(function () {
            if (strId != null) {
                model.lg = $.loading({
                    content: '加载中...',
                })
                $.getJSON('/API/WXAPI.ashx?Action=GETLCSPMODEL&r=' + Math.random(), { p1: strId }, function (resultData) {

                    if (resultData.ErrorMsg == "") {
                        model.modelData = resultData.Result;
                        model.tpData = resultData.Result2;
                        try {
                            model.tempData = JSON.parse(resultData.Result.Content);
                        } catch (ex) {
                            model.tempData = [{ "dataname": "内容", "value": resultData.Result.Content }]
                        }
                        model.ptype = resultData.Result1.ProcessType;
                        setTimeout("load()", 500);
                    }
                })
                $.post("/API/SZHLAPI.ashx?Action=GetUserInfo&r=" + Math.random(), {}, function (data) {

                    var data = $.parseJSON(data);
                    if (data.ErrorMsg == "") {
                        if (data.Result.QYinfo.FileServerUrl) {
                            var str = data.Result.QYinfo.FileServerUrl;
                            if (str.substr(str.length - 1, 1) != "/") {
                                str = str + "/";
                            }
                            model.imgurl = str;
                        }
                    }
                })
            }

        })

        function shzt() {

            var zt = '正在审批';

            if (psmodel.spData.isComplete == "Y") {
                zt = '已审批';
            }
            else if (psmodel.spData.IsCanceled == "Y") {
                zt = '已退回';
            }

            $(".shzt").text(zt);
        }
        function back() {
            window.location.replace("UI_LCSP_LIST.html?r=" + Math.random());
        }
    </script>
    <style>
        .ui-form-item .wspan {
            width: 100%;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            -webkit-appearance: none;
            border: 0;
            background: 0 0;
            padding-left: 95px;
        }

        .ms-controller, [ms-controller] {
            display: none;
        }

        .ui-form-item .span img {
            height: auto !important;
            width: auto\9 !important;
            width: 100% !important;
        }
    </style>

</head>
<body ms-controller="model">
    <header class="ui-header ui-header-stable ui-border-b">
        <i class="ui-icon-return" onclick="back()"></i><h1>流程审批信息查看</h1>
    </header>

    <section class="ui-container">
        <div class="ui-form ui-border-t">
            <div class="ui-form-item ui-border-b">
                <label>
                    申请人
                </label>
                <span class="wspan">{{modelData.ShenQingRen}}</span>
            </div>
            <div class="ui-form-item ui-border-b" style="height:auto">
                <label>
                    流程类别
                </label>
                <span class="wspan">{{modelData.LeiBie}}</span>
            </div>
            <!--<div class="ui-form-item ui-border-b" style="height:auto;min-height:44px">
                <label>
                    申请内容
                </label>
                <span class="wspan" ms-html="modelData.Content" style="overflow: hidden; word-wrap: break-word;"></span>
                <div style="clear: both"></div>
            </div>-->
            <div class="ui-form-item ui-border-b" style="height:auto;min-height:44px" ms-repeat-el="tempData">
                <label>
                    {{el.dataname}}
                </label>
                <span class="wspan" ms-html="el.value" style="overflow: hidden; word-wrap: break-word;"></span>
                <div style="clear: both"></div>
            </div>
            <div class="ui-form-item ui-border-b" style="height:auto;min-height:44px" ms-if="tpData.size()>0">
                <label>
                    图片
                </label>
                <div class="wspan" style="padding-top:10px">
                    <span ms-repeat-fl="tpData">
                        <img ms-click="fdtp(this)" ms-if="MobileCom.xstp(fl.FileExtendName)" class="mall_pcp" ms-src="imgurl+'image/'+fl.FileMD5" style="width:60px;height:60px;padding-right: 5px;" />
                    </span>
                    <span ms-repeat-fls="tpData">
                        <img ms-click="fdtp(this)" ms-if="!MobileCom.xstp(fls.FileExtendName)" class="mall_pcp" ms-attr-src="'/MobileView/Images/qywd/'+fls.FileExtendName+'.png'" style="width:60px;height:60px;padding-right: 5px;" />
                    </span>
                </div>
            </div>
            <div class="ui-form-item ui-border-b">
                <label>
                    创建时间
                </label>
                <span class="wspan">{{modelData.CRDate|date("yyyy-MM-dd HH:mm:ss")}}</span>
            </div>
            <div class="ui-form-item ">
                <label>
                    申请状态
                </label>
                <span class="wspan shzt"></span>
            </div>
            <div ms-include-src="UI_PROCESS.html?r={{rdm}}">
            </div>
        </div>

    </section>
</body>
</html>
